package com.com.athengzhi.springCloud.config;

import com.netflix.loadbalancer.IRule;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Package: com.com.athengzhi.springCloud.config
 * @ClassName: RestTemplet
 * @Author: lhz
 * @CreateTime: 2023/4/18 10:59
 * @Description:
 */
@Configuration
public class RestTempletConfig {
    @Bean
    //@LoadBalanced   //注解赋予RestTemplate负载均衡的能    使用自定义负载均衡算法需要把这个注解取消掉
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

}
